package com.hnucm.onlinealgstudy.service;

import com.hnucm.onlinealgstudy.dao.CommentMapper;
import com.hnucm.onlinealgstudy.pojo.Approval;
import com.hnucm.onlinealgstudy.pojo.Comment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CommentServiceImpl implements CommentService{
    @Autowired
    CommentMapper commentMapper;
    @Override
    public List<Comment> getCommentList() {
        return commentMapper.getCommentList();
    }

    @Override
    public void addComment(Comment comment) {
        commentMapper.addComment(comment);
    }

    @Override
    public void approvalComment(Approval approval) {
        commentMapper.approvalComment(approval);
    }

    @Override
    public void addLikeNum(Integer id) {
        commentMapper.addLikeNum(id);
    }

    @Override
    public void subLikeNum(Integer id) {
        commentMapper.subLikeNum(id);
    }
}
